srcdir=@srcdir@
top_srcdir=@top_srcdir@
top_builddir=@top_builddir@

MODULES_DIR = ../modules

COREOBJ  = SS5Main.o 		\
         SS5Core.o 		\
         SS5Server.o 		\
         SS5Utils.o 		\
         SS5Thread.o		\
         SS5Debug.o		\
         SS5GSSApi.o		\
         SS5Modules.o

COMMONOBJ = ../common/SS5OpenLdap.o ../common/SS5Radius.o ../common/SS5MySql.o

SRV     = ss5srv
SRVOBJ  = SS5Srv.o


CFLAGS=@CFLAGS@ -I . -I ../include  @EXTRA_CFLAGS@ 
SRVCFLAGS=@CFLAGS@ -I . -I ../include @EXTRA_CFLAGS@

LIBS = -lpthread @LIBS@ @EXTRA_LIBS@ -lcrypto

CC = gcc

all: ss5 $(SRV)

ss5:	$(COREOBJ)
	$(CC) $(CFLAGS) -o ss5 $(COREOBJ) $(COMMONOBJ) $(LIBS)

$(SRV):	$(SRVOBJ)
	$(CC) $(SRVCFLAGS) -o $(SRV) $(SRVOBJ) $(LIBS)



clean:
	rm -f $(COREOBJ)
	rm -f $(SRVOBJ)
	rm -f ss5
	rm -f ss5srv

distclean: clean
	rm -f Makefile
